package com.lanmaoly.study.service.impl;

import com.lanmaoly.study.annotation.AdminOnly;
import com.lanmaoly.study.service.AuthService;
import com.lanmaoly.study.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by chao.xia on 2018/1/7 14:47
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private AuthService authService;

    /**
     * 删除用户
     */
    @Override
    @AdminOnly
    public void delete(String name) {
        /*authService.auth(name);*/
        System.out.println("删除用户成功");
    }

    /**
     * 增加用户
     */
    @Override
    public void add(String name) {
        /*authService.auth(name);*/
        System.out.println("增加用户成功");
    }
}
